--- This is an undocumented module
module tests.qc.Targets where

import Compiler.types.Targets as T
import Test.QuickCheck public

{-- For a valid target string, the result of showing a decoded
    target should be the original string. -} 
p_sts ∷ Property
p_sts = forAll (elements ["0.1", "x.y", "1.7", 
                          "-5.3f", "1.8.23", "9", "12345.67890" ]) 
                stringit
    where
        stringit ∷ String → Bool
        stringit s = case Target.decode s of
            Just t  → s == show t
            Nothing → true

